﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeBehind="AttachementManage.aspx.cs" Inherits="XinBang.Web.Admin.AttachementManage" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headerplace" runat="server">
<script type="text/javascript" src="../js/lib/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $("img.thumbs").mouseover(function(){
        var src = $(this).attr("src").replace("thumbs","images");
        $("#example").empty().append("<img src='"+ src+"'>");
    });
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainplace" runat="server">
<h2><asp:Literal ID="ttitle" runat="server" Text="图片管理"></asp:Literal></h2>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
    CssClass="show" DataKeyNames="Gooid">
    <Columns>
        <asp:BoundField DataField="Gooid" HeaderText="编号" SortExpression="Gooid" >
            <ItemStyle HorizontalAlign="Center" />
        </asp:BoundField>
        <asp:TemplateField HeaderText="标题" SortExpression="Title">
            <ItemTemplate>
                <asp:HyperLink ID="edittitle" runat="server" NavigateUrl='<%# Bind("Gooid","GoodsManage.aspx?action=edit&artid={0}") %>' Text='<%# Bind("GoodsName") %>'>数据绑定</asp:HyperLink>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Price" HeaderText="商品价格" ReadOnly="True" SortExpression="Price" />
        <asp:BoundField DataField="Pubtime" HeaderText="发布日期" ReadOnly="True" SortExpression="Pubtime" />
        <asp:TemplateField HeaderText="图片管理" SortExpression="Title">
            <ItemTemplate>
                <asp:HyperLink ID="edittitle1" runat="server" NavigateUrl='<%# Bind("Gooid","AttachementManage.aspx?action=default&gooid={0}") %>'>图片管理</asp:HyperLink>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="库存管理" SortExpression="Title">
            <ItemTemplate>
                <asp:HyperLink ID="edittitle2" runat="server" NavigateUrl='<%# Bind("Gooid","StoreManage.aspx?action=default&gooid={0}") %>'>库存管理</asp:HyperLink>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="营销策略" SortExpression="Title">
            <ItemTemplate>
                <asp:HyperLink ID="edittitle3" runat="server" NavigateUrl='<%# Bind("Gooid","SaleStrategyManage.aspx?action=default&gooid={0}") %>'>营销策略</asp:HyperLink>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
    <AlternatingRowStyle CssClass="alt" />
    <PagerStyle CssClass="pager" />
    <EmptyDataTemplate>
        没有数据,<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="GoodsManage.aspx?action=add">添加数据</asp:HyperLink>!
    </EmptyDataTemplate>
</asp:GridView>
<asp:Repeater ID="ImageRepeater" runat="server">
    <HeaderTemplate>
        <div class="show">
            <div class="thumbs">
    </HeaderTemplate>
    <ItemTemplate>
        <img src='<%# Eval("Path") %>' class="thumbs" alt="" />
    </ItemTemplate>
    <FooterTemplate>
            </div>
            <div id="example">
            </div>
        </div>
    </FooterTemplate>
</asp:Repeater>
<asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View1" runat="server">
        <div class="show">
            <ul>
                <li><asp:LinkButton ID="AddPic" runat="server" OnClick="AddPic_Click">添加图片</asp:LinkButton>
            </ul>
        </div>
    </asp:View>
    <asp:View ID="View2" runat="server">
        <div class="show">
            图片1:<asp:FileUpload ID="uploadPic1" runat="server" /><br />
            图片2:<asp:FileUpload ID="uploadPic2" runat="server" /><br />
            图片3:<asp:FileUpload ID="uploadPic3" runat="server" /><br />
            图片4:<asp:FileUpload ID="uploadPic4" runat="server" /><br />
            图片5:<asp:FileUpload ID="uploadPic5" runat="server" /><br />
            <asp:Button ID="AddPictures" runat="server" Text="添加" OnClick="AddPictures_Click" /> <br />
            <asp:Label ID="uploadInfo" runat="server" Text=""></asp:Label>
        </div>
    </asp:View>
    <asp:View ID="View3" runat="server">
        <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
            <ul>
        </HeaderTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
        <ItemTemplate>
            <li><asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Catid","GoodsManage.aspx?action=list&catid={0}") %>' Text='<%# Eval("CatalogName","{0}") %>'>绑定数据</asp:HyperLink></li>
        </ItemTemplate>
        </asp:Repeater>
    </asp:View>
    <asp:View ID="View4" runat="server">
        <table class="show">
            <tr><td>
                <asp:HiddenField ID="Gooid" runat="server" />
			名称:<asp:TextBox ID="GoodsNameBox" runat="server" Columns="40"></asp:TextBox><br />
			价格:<asp:TextBox ID="PriceBox" runat="server"></asp:TextBox><br />
			介绍:<asp:TextBox  ID="ContentBox" runat="server" Columns="90" MaxLength="8000" Rows="15" TextMode="MultiLine"></asp:TextBox><br />
			<asp:LinkButton ID="Save" runat="server" OnClick="Save_Click">保存</asp:LinkButton> 
                <asp:LinkButton ID="Reset" runat="server" CausesValidation="False" CommandName="Cancel">重置</asp:LinkButton></td></tr>
	    </table>
    </asp:View>
</asp:MultiView>
</asp:Content>